/**
 *
 * Retrieve the list of all window handles available to the session.
 *
 * <example>
    browser
        .url('http://localhost/one.html')
        .newWindow('http://localhost/two.html')
        .windowHandles().then(function(windowHandles) {
            console.log('windowHandles:');
            // Outputs something like
            // {
            //    state: 'success',
            //    sessionId: '31dc8253-a27e-4bae-8d20-338d6b0541c9',
            //    hCode: 273402755,
            //    value:
            //    [ 'CDwindow-CBFE1412-8D46-495C-96B4-42E04F9153C0',
            //        'CDwindow-BD7BE568-52F2-4552-B834-FE2D041DCE5B' ],
            //    class: 'org.openqa.selenium.remote.Response',
            //    status: 0
            // }
        })
 * </example>
 *
 * @returns {Object} Contains a list of window handles
 *
 * @see https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window_handles
 * @type protocol
 *
 */

module.exports = function windowHandles () {

    return this.requestHandler.create(
        '/session/:sessionId/window_handles'
    );

};